package com.hr.controller;

import com.hr.entity.AoaTypeList;
import com.hr.service.AoaTypeListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * (AoaTypeList)表控制层
 *
 * @author makejava
 * @since 2022-06-22 20:33:15
 */
@RestController
@RequestMapping("aoaTypeList")
public class AoaTypeListController{
    /**
     * 服务对象
     */
    @Autowired
    private AoaTypeListService aoaTypeListService;


    /**
     * 查询与模糊查询
     * @param typeModel
     * @return
     */
    @RequestMapping("/queryList")
    public List<AoaTypeList> queryList(String typeModel) {
        return aoaTypeListService.queryList(typeModel);
    }


    /**
     * 保存或修改
     * @param aoaTypeList
     * @return
     */
    @PostMapping("/save")
    public boolean save(@RequestBody AoaTypeList aoaTypeList) {
        boolean save = aoaTypeListService.save(aoaTypeList);
        return save;
    }

    /**
     * 单值查询
     * @param id
     * @return
     */
    @GetMapping("/queryById")
    public AoaTypeList queryById(Integer id) {
        return aoaTypeListService.queryById(id);
    }

    /**
     * 删除
     * @param id
     * @return
     */
    @DeleteMapping("/delete")
    public boolean delete(Integer id) {
        boolean delete = aoaTypeListService.delete(id);
        return delete;
    }
}

